package com.spring.lth.feign;

import com.spring.lth.domain.Card;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author 罗天豪
 * @date 2019/7/26
 */
@FeignClient(name = "card-server")
public interface CardService {
    @GetMapping("/card/{id}")
    Card getCardById(@PathVariable("id") Long id);

    @PostMapping("/card")
    Card saveCard(@RequestBody Card card);

    @DeleteMapping("/card")
    Card removeCard(@RequestBody Card card);
}
